import http from "@/utils/http2.js";


/**
 * 更新询价单的hasForwarderInquiry字段0变1
 */
export function updateHasForwarderInquiry(code) {
  return http.put(`/api/customerInquiry/updateHasForwarderInquiry/${code}`);
}


/**
 * 查询全部的工程师
 */
export function queryAllSale() {
  return http.get("/api/employee/list");
}


export function queryInquiry(data) {
  return http.post("/api/customerInquiry/list", data);
}

export function getDetail(id) {
  return http.get("/api/customerInquiry", {id});
}
/**
 * 保存询价单
 * @param {*} data
 * @returns
 */
export function saveInquiry(data) {
  return http.post("/api/customerInquiry", data);
}

/**
 * 根据询价单id查询相关的货品信息
 * @param InquiryId 客户询价单id
 * @returns
 */
export function queryForwarderProductByInquiryId(inquiryId,page,pageSize) {
  console.log('Request Params:', inquiryId,page,pageSize);
  return http.get(`/api/customer/detail/${inquiryId}/${page}/${pageSize}`); // 使用路径参数传递 id
}




